package jm.nj.demo12mian.demo01;

import java.io.FileReader;
import java.io.IOException;

/*
* 使用FileReader读取gbk格式的文件,会出现乱码    (看系统默认)
* */
public class Demo01 {
    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("d:\\1.txt");
        int len;
        while ((len= fr.read())!=-1){
            System.out.print((char)len);
        }
    }
//FileReaer  读utf-8
}
